﻿using System;
using System.Configuration;

namespace Tilver.Configuration.Logging
{
    /// <summary>
    /// Logging模块配置节信息
    /// </summary>
    public class LoggingConfigElement : ConfigurationElement
    {
        /// <summary>
        /// 默认日志配置名
        /// </summary>
        [ConfigurationProperty("defaultCategory", IsRequired = false)]
        public string DefaultCategory
        {
            get { return (string)this["defaultCategory"]; }
            set { this["defaultCategory"] = value; }
        }

        /// <summary>
        /// 日志文件输出类型
        /// </summary>
        [ConfigurationProperty("categorys")]
        public CategoryCollection Categorys
        {
            get { return this["categorys"] as CategoryCollection; }
            set { this["categorys"] = value; }
        }

        /// <summary>
        /// 日志文件输出格式化配置信息集合
        /// </summary>
        [ConfigurationProperty("fileAppenders")]
        public FileAppenderCollection FileAppenders
        {
            get { return this["fileAppenders"] as FileAppenderCollection; }
            set { this["fileAppenders"] = value; }
        }

        [ConfigurationProperty("customAppenders")]
        public CustomAppenderCollection CustomAppenders
        {
            get { return this["customAppenders"] as CustomAppenderCollection; }
            set { this["customAppenders"] = value; }
        }

    }

}
